import os
import shutil

root = os.path.dirname(os.path.abspath(__file__))

# 所有需要清理的模块
modules = [
    "gate-server",
    "login-server", 
    "central-server",
    "scene-server",
    "balance-server",
    "test-client",
    "integration-test"
]

for module in modules:
    old_package_path = os.path.join(root, module, "src", "main", "java", "com", "lastwar")
    if os.path.exists(old_package_path):
        print(f"删除: {old_package_path}")
        shutil.rmtree(old_package_path)
        print(f"  ✅ 已删除")

print("\n✅ 所有旧包名目录已清理完成")
